package 用队列实现栈;

public class Test {
    public static void main(String[] args) {
        MyStack myStack = new MyStack();
        myStack.push(1);
        myStack.push(2);
        myStack.push(3);
        System.out.print(myStack.top()+" ");
        System.out.print(myStack.pop()+" ");
        System.out.print(myStack.top()+" ");
        System.out.print(myStack.pop()+" ");
        System.out.print(myStack.top()+" ");
        System.out.print(myStack.empty()+" ");
        System.out.print(myStack.pop()+" ");
        System.out.print(myStack.empty()+" ");

    }
}
